package com.qf.shopping.dto.MessageDTO;

import com.qf.shopping.pojo.message.Message;

import java.net.URL;

public class MessageDTO {
    private long id;
    private String title;
    private String userName;
    private String content;//消息内容
    private long sendTime;//时间发送时间
    private String url;

    public MessageDTO(Message m){
        this.id=m.getId();
        this.title=m.getTitle();
        this.content=m.getContent();
        this.sendTime=m.getSendTime();
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public long getSendTime() {
        return sendTime;
    }

    public void setSendTime(long sendTime) {
        this.sendTime = sendTime;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    @Override
    public String toString() {
        return "MessageDTO{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", userName='" + userName + '\'' +
                ", content='" + content + '\'' +
                ", sendTime=" + sendTime +
                ", url='" + url + '\'' +
                '}';
    }
}
